home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / swtools / mipsABI / examples / sup / PORT / step06 / supfilesrv.c.diff < prev    next >
Encoding:
Text File  |  1994-08-02  |  852 b   |  40 lines

  1. *** ../step05/supfilesrv.c    Thu Dec 16 15:24:56 1993
  2. --- supfilesrv.c    Fri Dec 17 12:49:41 1993
  3. ***************
  4. *** 443,448 ****
  5. --- 443,449 ----
  6.   {
  7.       union wait w;
  8.   
  9. +     /* XXX all the signal stuff needs attention */
  10.       while (wait3(&w, WNOHANG, (struct rusage *)0) > 0) {
  11.           if (nchildren) nchildren--;
  12.       }
  13. ***************
  14. *** 618,623 ****
  15. --- 619,627 ----
  16.   {
  17.       long starttime;
  18.       register int x;
  19. + #ifdef _ABI_SOURCE
  20. +     struct rlimit rl;
  21. + #endif
  22.   
  23.       progpid = fspid = getpid ();
  24.       collname = NULL;
  25. ***************
  26. *** 649,655 ****
  27. --- 653,664 ----
  28.               (void) dup2 (netfile,0);
  29.               (void) dup2 (netfile,1);
  30.               (void) dup2 (netfile,2);
  31. + #ifdef _ABI_SOURCE
  32. +             getrlimit (RLIMIT_NOFILE, &rl);
  33. +             fd = rl.rlim_max;
  34. + #else
  35.               fd = getdtablesize ();
  36. + #endif
  37.               while (--fd > 2)
  38.                   (void) close (fd);
  39.               execvp (xargv[0],xargv);
  40.